/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ru.vsu.csf.qasystem;

import edu.stanford.smi.protege.model.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import ru.narod.macrocosm.mcr.*;
import ru.vsu.csf.qasystem.morph.data.MystemAdapter;
/**
 *
 * @author Руслан
 */
public class QAApplication {

    /**
     * @param args the command line arguments
     */
    private static final String PROJECT_FILE_NAME = "D:\\Учёба\\ФКН\\5 курс\\Диплом\\knowledge\\123.pprj";

    public static void main(String[] args) {
        /* Collection errors = new ArrayList();
        Project project = new Project(PROJECT_FILE_NAME, errors);
        if (errors.size() == 0) {
            KnowledgeBase kb = project.getKnowledgeBase();
            Iterator i = kb.getClses().iterator();
            while (i.hasNext()) {
            	Cls cls = (Cls) i.next();
                System.out.println("Class: " + cls.getName());
                Iterator j = cls.getDirectInstances().iterator();
                while (j.hasNext()) {
               	    Instance instance = (Instance) j.next();
                    System.out.println("  Instance: " + instance.getName());
                }
            }
        } else {
            displayErrors(errors);
        }
        waitForContinue();*/
        /*Ray r = new Ray();
        StringBuffer buf = new StringBuffer();
        r.search("красной", buf);
        System.out.print(buf.toString());
        */
        MystemAdapter m = new MystemAdapter();
        m.loadDictionary();

    }



    private static void displayErrors(Collection errors) {
    	Iterator i = errors.iterator();
        while (i.hasNext()) {
            System.out.println("Error: " + i.next());
        }
    }

    private static void waitForContinue() {
        System.out.println("Press <Enter> to continue");
        try {
            System.in.read();
       	} catch (Exception e) {}
    }
}
